import { http } from '@/utils/http'

export const wf_flow_submit = (transApplyId,workitemId,applyDeptId) => {
  return http({
    url: `/wf_flow_submit?transApplyId=${transApplyId}&workitemId=${workitemId}&applyDeptId=${applyDeptId}`,
    method: 'post',
  })
}

export const select_register_by_ids = (ids) => {
  return http({
    url: `/select_register_by_ids?ids=${ids}`,
    method: 'post',
  })
}

export const wfTypeFindPage = () => {
  return http({
    url: "/wfmanager/wfType/findPage",
    method: 'get',
  })
}

export const workflowReject = (transApplyId,workitemId,applyDeptId,suggestion) => {
  return http({
    url: `/work_flow_reject?workitemId=${workitemId}&transApplyId=${transApplyId}&applyDeptId=${applyDeptId}&suggestion=${suggestion}`,
    method: 'get',
  })
}

export const select_flow_detail = (instanceId) => {
  return http({
    url: `/select_flow_detail?instanceId=${instanceId}`,
    method: 'get',
  })
}

export const select_user_by_ids = (ids) => {
  return http({
    url: `/select_user_by_ids?ids=${ids}`,
    method: 'post',
  })
}

export const update_trans_apply_weight = (applyId,weight) => {
  return http({
    url: `/update_trans_apply_weight?applyId=${applyId}&weight=${weight}`,
    method: 'get',
  })
}